package org.example;

import ch.qos.logback.classic.PatternLayout;
import ch.qos.logback.classic.spi.ILoggingEvent;
import cn.hutool.core.util.RandomUtil;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

/**
 * @author : libo@juzishuke.com
 * @Title :
 * @Description :
 * @date : 2024/4/7 17:38
 * @since :1.0
 */
@Slf4j
public class MyPatternLayout extends PatternLayout {

    @SneakyThrows
    @Override
    public String doLayout(ILoggingEvent event) {
        Thread.sleep(RandomUtil.randomLong(10,1000));
        return super.doLayout(event);
    }
}
